import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { StoreBalanceChangeVO, StoreBalanceChangeForm, StoreBalanceChangeQuery } from '@/api/business/storeBalanceChange/types';

/**
 * 查询诊所余额变动列表
 * @param query
 * @returns {*}
 */

export const listStoreBalanceChange = (query?: StoreBalanceChangeQuery): AxiosPromise<StoreBalanceChangeVO[]> => {
  return request({
    url: '/business/storeBalanceChange/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询诊所余额变动详细
 * @param id
 */
export const getStoreBalanceChange = (id: string | number): AxiosPromise<StoreBalanceChangeVO> => {
  return request({
    url: '/business/storeBalanceChange/' + id,
    method: 'get'
  });
};

export const findOneChatList = (data) => {
  return request({
    url: '/business/storeBalanceChange/findOneChatList',
    method: 'post',
    data: data
  });
};

/**
 * 新增诊所余额变动
 * @param data
 */
// export const addStoreBalanceChange = (data: StoreBalanceChangeForm) => {
//   return request({
//     url: '/business/storeBalanceChange',
//     method: 'post',
//     data: data
//   });
// };

/**
 * 修改诊所余额变动
 * @param data
 */
// export const updateStoreBalanceChange = (data: StoreBalanceChangeForm) => {
//   return request({
//     url: '/business/storeBalanceChange',
//     method: 'put',
//     data: data
//   });
// };

/**
 * 删除诊所余额变动
 * @param id
 */
// export const delStoreBalanceChange = (id: string | number | Array<string | number>) => {
//   return request({
//     url: '/business/storeBalanceChange/' + id,
//     method: 'delete'
//   });
// };
